package com.dalin.platform.autocode.action;

import com.dalin.framework.action.StrutsTwoAction;
import com.dalin.platform.autocode.service.AutocodeService;
import com.dalin.platform.autocode.vo.GlbGridHeaderVo;
/*****************************************************************************
 * @content:                                                                *
 * @author : 那建林                                                                                                                               *
 * @crtDate: 2011-03-09 05:11:06                                            *
 * @modDate: 2011-03-09 05:11:06                                            *
 * @version: 1.00                                                           *
 ****************************************************************************/
public class GlbGridHeaderAddModAction extends StrutsTwoAction{
	private AutocodeService autocodeService; // 
    private GlbGridHeaderVo vo; // 





    public String execute()throws Exception {
        super.printInfo("", "===== this action begin");
        try {
        	 if (vo.getHeaderId() == null) {
        		 autocodeService.addGlbGridHeader(vo);
             } else {
            	 autocodeService.modifyGlbGridHeader(vo);
             }
        	 setResContent(true, "");
        } catch (Exception e) {
        	e.printStackTrace();
        	setResContent(e);
        }
        super.printInfo("", "===== this action end");
        return null;

    }

    public AutocodeService getAutocodeService() {
		return autocodeService;
	}
	public void setAutocodeService(AutocodeService autocodeService) {
		this.autocodeService = autocodeService;
	}

	public GlbGridHeaderVo getVo() {
		return vo;
	}
	public void setVo(GlbGridHeaderVo vo) {
		this.vo = vo;
	}
}
